// 蜂窝蜜造平台生成代码，如手工更改，请添加到 .beeignore 忽略生成

package com.fowo.api.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fowo.api.common.model.OptionItem;
import com.fowo.api.entity.ShopProfitReport;
import com.fowo.api.model.shop.profit.report.ShopProfitReportItemVo;
import com.fowo.api.model.shop.profit.report.ShopProfitReportSearchParamPo;
import com.fowo.api.model.shop.profit.report.ShopProfitReportVo;
import java.util.Date;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ShopProfitReportMapper extends BaseMapper<ShopProfitReport> {
  Page<ShopProfitReportItemVo> pageSearch(
    @Param("page") Page page,
    @Param("search") ShopProfitReportSearchParamPo search
  );
  List<OptionItem<ShopProfitReportItemVo>> searchOptions(
    @Param("search") ShopProfitReportSearchParamPo search
  );
  List<ShopProfitReportItemVo> search(
    @Param("search") ShopProfitReportSearchParamPo search
  );
  Date searchLastUpdateTime(
    @Param("search") ShopProfitReportSearchParamPo search
  );
  /**
   * 搜索满足条件的所有记录的编号列表
   * @param search 搜索参数
   * @return 编号列表
   */
  List<Long> searchIds(@Param("search") ShopProfitReportSearchParamPo search);
  /**
   * 搜索满足条件的记录数量
   * @param search 搜索参数
   * @return 记录数量
   */
  Long searchCount(@Param("search") ShopProfitReportSearchParamPo search);
  Long getIdByTotalSalesQuantity(
    @Param("totalSalesQuantity") Integer totalSalesQuantity
  );

  List<Long> getIdsByTotalSalesQuantity(@Param("list") List<Integer> list);

  Integer getTotalSalesQuantityById(@Param("id") Long id);

  List<Map<String, Object>> getTotalSalesQuantityByIds(
    @Param("ids") List<Long> ids
  );
  ShopProfitReportVo selectVoById(@Param("id") Long id);
  /** 获取币种搜索时自动完成选项 */
  List<String> selectCurrencyCodeAutoComplete();
}
